//
//  ThreePictureTableViewCell.m
//  B段项目
//
//  Created by 徐茂怀 on 15/11/5.
//  Copyright © 2015年 徐茂怀. All rights reserved.
//

#import "ThreePictureTableViewCell.h"
#import "FitHeader.h"
@implementation ThreePictureTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

-(void)createView
{
    _leftImageView = [[UIImageView alloc]init];
    _leftLabel = [[UILabel alloc]init];
    _middleImageView = [[UIImageView alloc]init];
    _middleLabel = [[UILabel alloc]init];
    _rightImageView = [[UIImageView alloc]init];
    _rightLabel = [[UILabel alloc]init];
    _makeLabel = [[UILabel alloc]init];
    _allMakeButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [_allMakeButton setTitle:@"查看全部做法" forState:0];
    [_allMakeButton setTitleColor:[UIColor colorWithRed:0.13 green:0.67 blue:0.63 alpha:1] forState:UIControlStateNormal];
    [self.contentView addSubview:_leftLabel];
    [self.contentView addSubview:_leftImageView];
    [self.contentView addSubview:_middleImageView];
    [self.contentView addSubview:_middleLabel];
    [self.contentView addSubview:_rightImageView];
    [self.contentView addSubview:_rightLabel];
    [self.contentView addSubview:_makeLabel];
    [self.contentView addSubview:_allMakeButton];
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    _makeLabel.frame = CGRectMake(10 * FitWidth, 5 * FitHeight, 150 * FitWidth, 30 * FitHeight);
    _leftImageView.frame = CGRectMake(_makeLabel.frame.origin.x + 5 * FitWidth, _makeLabel.frame.origin.y + _makeLabel.frame.size.height + 10 * FitHeight, 105 * FitWidth, 105 * FitWidth);
    _leftLabel.frame = CGRectMake(_leftImageView.frame.origin.x, _leftImageView.frame.origin.y + _leftImageView.frame.size.height + 5 * FitWidth, _leftImageView.frame.size.width, 40 * FitHeight);
    _middleImageView.frame = CGRectMake(_leftImageView.frame.origin.x + _leftImageView.frame.size.width + 10 * FitWidth, _leftImageView.frame.origin.y, _leftImageView.frame.size.width, _leftImageView.frame.size.height);
    _middleLabel.frame = CGRectMake(_middleImageView.frame.origin.x, _middleImageView.frame.origin.y + _middleImageView.frame.size.height + 5 * FitHeight, _middleImageView.frame.size.width, 40 * FitHeight);
    _rightImageView.frame = CGRectMake(_middleImageView.frame.origin.x + _middleImageView.frame.size.width + 10 * FitWidth, _middleImageView.frame.origin.y, _middleImageView.frame.size.width, _middleImageView.frame.size.height);
    _rightLabel.frame = CGRectMake(_rightImageView.frame.origin.x, _rightImageView.frame.origin.y + _rightImageView.frame.size.height + 5 * FitHeight, _rightImageView.frame.size.width, 40 * FitHeight);
    _allMakeButton.frame = CGRectMake(200 * FitWidth, 5 * FitHeight, 150 * FitWidth, 30 * FitHeight);
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
